/**
 * Copyright(c) 2019 Shenzhen Muchinfo CO, LTD.
 * All Rights Reserved.
 * @file       MessageOrderDealedNtf.h
 * @author     zou.yingbin
 * @Create      : 2019-9-24 10:26:14
 * @Modified    : 2019-9-24 10:26:14
 * @version    1.0
 * @note       
 */
#ifndef _MESSAGEORDERDEALEDNTF_H_
#define _MESSAGEORDERDEALEDNTF_H_

#include "MessageProcImpl.h"
#include "mtp_funcodes.h"
#include "NotifyMI1.pb.h"
#include "MessageElement.h"
#include "Memory.pb.h"
#include "FollowOrderSetMgr.h"

using namespace NotifyMI1;

BEGIN_NAMESPACE_MTP

class MessageOrderDealedNtf
    : public MessageProcImpl <
    MessageOrderDealedNtf,
    FID_OrderDealedNtf,
    OrderDealedNtf
    >
{
public:
    MessageOrderDealedNtf(const MessageElement &msg);
protected:
    bool on_process(OrderDealedNtf &proto) override;

    void parseAccountID(const std::string& accountid2, std::set<uint64_t>& accountids);

    bool checkFollowSet(OrderDealedNtf &proto, std::shared_ptr<FollowSetEx>& orderset);

    void singleFollow(OrderDealedNtf &proto, std::shared_ptr<FollowSetEx>& orderset);

    void singleFollowOutside(OrderDealedNtf &proto, std::shared_ptr<FollowSetEx>& orderset);
};

END_NAMESPACE_MTP

#endif //_MESSAGEORDERDEALEDNTF_H_
